<script setup lang="ts">
import pfmea_file_manage from "./components/pfmea_file_manage.vue";
import { ref, reactive, toRefs, unref, onMounted } from "vue";
import { TableHeaderInfo, OpInfo } from "./components/pfmea_file_manage";
import { useRouter, useRoute } from "vue-router";

defineOptions({
  name: "N12"
});

const infodata = reactive({
  pfmea_number: "",
  partNumber: "",
  partName: "",
  responsibility: "",
  keyDate: "",
  editDate: "",
  editor: "",
  coreTeam: "",
  version: ""
});
const route = useRoute();

const stationList = ref<String[]>([]);
const base = ref<String>(route.meta.base);
console.log(route.meta.base_zone);
const base_zone = ref<String>(route.meta.base_zone);
const partName = ref<String>("N12");

onMounted(() => {
  console.log("组件挂载啦");
  TableHeaderInfo("N12", infodata); //此处传入参数，筛选出需要的info信息
  OpInfo(stationList, {
    base: base.value,
    base_zone: base_zone.value,
    partname: "N12"
  });
});
</script>

<template>
  <pfmea_file_manage
    :Info="infodata"
    :stationList="stationList"
    :partName="partName"
    :base="base"
    :base_zone="base_zone"
  />
</template>
